/*
 *  Copyright 2020-2025 the original author or authors.
 *  You cannot use this file unless authorized by the author.
 */

package org.ipig.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.ToString;
import org.ipig.constants.DbmsOperators;
import org.ipig.constants.SymbolCnst;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * JoinCacheConf
 *
 * @author <a href="mailto:comchnts@163.com">chinats</a>
 * @version $$Id$$
 * @since 1.0
 */
@Data
@ToString
public class JoinCacheConf implements Serializable {
    //缓存存储区域名称
    private String regionName;
    //缓存提供类型  参考ProviderCnst.CacheProvider
    private String cacheType;
    //缓存代码
    private String cacheCode;
    //key字段，多个以逗号隔开
    private String keyFields;
    //值字段，多个以逗号隔开,如果此字段为空则
    private String valueFields;
    //key字段分隔符,当key字段存在多个时使用,默认为井号
    private String keySeparator= SymbolCnst.WELL;
    //value字段分隔符,当value字段存在多个时使用,默认为井号
    private String valueSeparator= SymbolCnst.WELL;
    //连接类型：支持inner(内连接）【默认】-用于业务关联、rigth(右连接）-用于业务关联、left(左连接)-用于参数关联
    private String joinType = DbmsOperators.JoinType.INNER.code;
    //连接器Conf
    @JSONField(serialize = false, deserialize = false)
    private ConnectorConf connectorConf;
    private String connectorCode;
    /**调试输出标识 默认关闭*/
    private Boolean debugEnable =Boolean.valueOf(false);
    // 其它属性
    private Map<String, Object> props = new HashMap<String, Object>();
}
